{include file="public/header" /}
<form class="layui-form">
	<input type="hidden" name="id" value="{$id}">
	<div class="layui-form-item">
		<label class="layui-form-label">用户ID</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="uid" placeholder="请输入用户ID">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">姓名</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="baby_name" placeholder="请输入孩子姓名">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">学校名</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="baby_school" placeholder="请输入孩子学校名">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">班级名</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="baby_class" placeholder="请输入孩子班级名">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">家长姓名</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="parent_name" placeholder="请输入家长姓名">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">家长电话</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="parent_phone" placeholder="请输入家长电话">
		</div>
	</div>
</form>
<div class="layui-form-item" style="margin-top:10px;">
	<div class="layui-input-block">
		<button type="button" class="layui-btn" onclick="save()">保存</button>
	</div>
</div>
<script type="text/javascript">
	layui.use(['layer','form'],function(){
		var form = layui.form;
		layer = layui.layer;
		$ = layui.jquery;
	});

	function save(){
		$.post("{$config['admin_route']}oyk/enroll_add",$('form').serialize(),function(res){
			if(res.code>0){
				layer.msg(res.msg,{'icon':2});
			}else{
				layer.msg(res.msg,{'icon':1});
				setTimeout(function(){parent.window.location.reload();},1000);
			}
		},'json');
	}
</script>
{include file="public/tail" /}